
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "WeaponBase.h"
#include "HoldData.h"
#include "WeaponHoldBase.generated.h"

/**
 * 
 */
UCLASS()
class ISALONG2_API AWeaponHoldBase : public AWeaponBase
{
	GENERATED_BODY()

public:
	AWeaponHoldBase();

	virtual void SetUpData(FInteractData* data, int itemType) override;

	virtual void OnFireBegin() override;

	virtual void OnFireEnd() override;

	virtual void OnFireAnimationFired() override;

	virtual void OnFireAnimationEnd() override;

	virtual int GetAdditionValue() override;
	
protected:
	UBoxComponent* _attackOverlaper;
	TArray<FHitResult> _preAttackActor;

private:
	UFUNCTION()
	void OnAttackTargetBeginOverlap(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

	UFUNCTION()
	void OnAttackTargetEndOverlap(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
	
};
